package org.dromara.iot.service;

import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.iot.domain.bo.IotUpkeepInfoBo;
import org.dromara.iot.domain.vo.IotUpkeepInfoVo;

import java.util.Collection;
import java.util.List;

/**
 * 电梯保养信息Service接口
 *
 * @author lsl
 * @date 2024-06-14
 */
public interface IIotUpkeepInfoService {

    /**
     * 查询电梯保养信息
     */
    IotUpkeepInfoVo queryById(Long upkeepId);

    /**
     * 查询电梯保养信息列表
     */
    TableDataInfo<IotUpkeepInfoVo> queryPageList(IotUpkeepInfoBo bo, PageQuery pageQuery);

    /**
     * 查询电梯保养信息列表
     */
    List<IotUpkeepInfoVo> queryList(IotUpkeepInfoBo bo);

    /**
     * 新增电梯保养信息
     */
    Boolean insertByBo(IotUpkeepInfoBo bo);

    /**
     * 修改电梯保养信息
     */
    Boolean updateByBo(IotUpkeepInfoBo bo);

    /**
     * 校验并批量删除电梯保养信息信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 开始保养电梯
     *
     * @param upkeepId 主键
     */
    Boolean startUpkeep(Long upkeepId);

    /**
     * @param upkeepId
     * @param projectType
     * @return
     */
    IotUpkeepInfoVo projectDetail(Long upkeepId, String projectType);

    /**
     * 提交保养审核信息
     *
     * @param upkeepInfo 保养信息
     * @return 是否成功
     */
    Boolean submitUpkeepAuditInfo(IotUpkeepInfoBo upkeepInfo);

    /**
     * 查询如果需要保养的电梯进行保养(定时器每天凌晨1点执行一次)
     */
    void saveUpkeepBusinessInfo();
}
